Skip to content

Move protected-branch edits into agent worktrees automatically#21

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/20260411-144342-odin-megkapja-hu-auto-transfer-protected-dirty
Apr 11, 2026
Merged

Move protected-branch edits into agent worktrees automatically#21
NagyVikt merged 1 commit intomainfrom
agent/codex/20260411-144342-odin-megkapja-hu-auto-transfer-protected-dirty

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by scripts/agent-branch-finish.sh (PR flow).

When users accidentally edit main/dev before starting an agent lane, those changes should follow the new agent branch instead of staying on the protected checkout. agent-branch-start now auto-stashes tracked changes on protected base branches and re-applies them in the created agent worktree.

Constraint: Keep codex-agent launches working even when setup left only untracked files on base branch
Rejected: Auto-transfer all dirty states including untracked-only changes | broke codex-agent tests by forcing unnecessary stash re-apply
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Preserve protected-branch auto-transfer for tracked edits; if stash format changes, keep stash-ref parsing colon-safe
Tested: node --test test/fuzzing.test.js test/install.test.js test/metadata.test.js (pass)
Not-tested: Manual conflict-heavy stash apply with partially overlapping tracked edits across very large repos
@NagyVikt NagyVikt merged commit f9c1e09 into main Apr 11, 2026
7 checks passed
@NagyVikt NagyVikt deleted the agent/codex/20260411-144342-odin-megkapja-hu-auto-transfer-protected-dirty branch April 11, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant